import config from "@/config"
import http from "@/utils/request"

export default {
    list: {
        url: `${config.API_URL}/order/list`,
        name: "数据列表",
        get: async function (params) {

            return await http.post(this.url, params);
        }
    },
    content: {
        url: `${config.API_URL}/order/content`,
        name: "数据列表",
        get: async function (params) {

            return await http.post(this.url, params);
        }
    },
    addContent: {
        url: `${config.API_URL}/order/addContent`,
        name: "新增Content数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    deleteContent: {
        url: `${config.API_URL}/order/deleteContent`,
        name: "删除Content数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    add: {
        url: `${config.API_URL}/order/add`,
        name: "新增数据",
        post: async function (params) {

            return await http.post(this.url, params);
        }
    },
    update: {
        url: `${config.API_URL}/order/update`,
        name: "更新数据",
        post: async function (params) {

            return await http.post(this.url, params);
        }
    },
    delete: {
        url: `${config.API_URL}/order/delete`,
        name: "删除数据",
        post: async function (params) {

            return await http.post(this.url, params);
        }
    },
    flowlist: {
        url: `${config.API_URL}/order/flow`,
        name: "获取流程记录",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    verify: {
        url: `${config.API_URL}/order/verify`,
        name: "审核数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    submit: {
        url: `${config.API_URL}/order/submit`,
        name: "提交审核",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    execute: {
        url: `${config.API_URL}/order/execute`,
        name: "执行数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    test: {
        url: `${config.API_URL}/order/test`,
        name: "测试数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    stop: {
        url: `${config.API_URL}/order/stop`,
        name: "中止数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    accept: {
        url: `${config.API_URL}/order/accept`,
        name: "台站接收",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    updateDetail: {
        url: `${config.API_URL}/order/updateDetail`,
        name: "更新数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    plan: {
        url: `${config.API_URL}/order/plan`,
        name: "plan数据列表",
        get: async function (params) {
            return await http.post(this.url, params);
        }
    },
    addPlan: {
        url: `${config.API_URL}/order/addPlan`,
        name: "新增plan数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    deletePlan: {
        url: `${config.API_URL}/order/deletePlan`,
        name: "删除plan数据",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    sendMsg: {
        url: `${config.API_URL}/order/sendMsg`,
        name: "发送消息",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    // upLoad: {
    //     url: `${config.API_URL}/upload`,
    //     name: "上传文件",
    //     upload: async function (params) {

    //         return await http.upload(this.url, params);
    //     }
    // },
    download: {
        url: `${config.API_URL}/upload/downloadFile`,
        name: "下载文件",
        get: async function (params, otherconfig) {
            return await http.get(this.url, params, otherconfig);
        }
    },
    contactor: {
        url: `${config.API_URL}/order/contactor`,
        name: "获取紧急联系人",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    getalarm: {
        url: `${config.API_URL}/order/getalarm`,
        name: "获取告警",
        get: async function (params) {

            return await http.post(this.url, params);
        }
    },
}
